﻿<Page x:Class="UIT.Sample.MyFirstPage"  xmlns="http://dragon-angel.fr/uit" Title="Ma page à moi" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib"
      xmlns:web="http://dragon-angel.fr/uit/web" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:local="clr-namespace:UIT.Sample;assembly=UIT.Sample" Background="White">
    <StackPanel web:Form.FormId="myForm" Orientation="Vertical" Width="100%">
        <TextBox Id="tb_my" />
        <Button Id="btn_my" IsDefault="True" Text="Test" Click="TestClick" />
        <web:LineBreak />
        <web:Repeater Id="rpt1">
            <web:Repeater.DataSource>
                <EnumerableDataProvider>
                    <local:CustomObject Prop1="1-1" Prop2="1-2">
                        <local:CustomObject.Child>
                            <local:CustomObject Prop1="1-1-1" Prop2="1-1-2">
                                <local:CustomObject.Child>
                                    <local:CustomObject Prop1="1-1-1-1" Prop2="1-1-1-2">
                                        <local:CustomObject.Child>
                                            <local:CustomObject Prop1="1-1-1-1-1" Prop2="1-1-1-1-2">

                                            </local:CustomObject>
                                        </local:CustomObject.Child>
                                    </local:CustomObject>
                                </local:CustomObject.Child>

                            </local:CustomObject>
                        </local:CustomObject.Child>
                    </local:CustomObject>
                    <local:CustomObject Prop1="2-1" Prop2="2-2" />
                    <local:CustomObject Prop1="3-1"  Prop2="3-2" />
                </EnumerableDataProvider>
            </web:Repeater.DataSource>
            <web:Repeater.ItemTemplate>
                <DataTemplate web:ClientTemplate.RunAt="Client">
                    <StackPanel Orientation="Horizontal" Width="100%">
                        <Button Text="{Binding Path=Child.Child.Prop1,StringFormat=Select {0}}" Command="Select" />
                        <Button Text="{Binding Prop2,StringFormat=Delete {0}}" AclResource="{Binding Prop2, StringFormat=/Feature/{0}}" />
                    </StackPanel>
                </DataTemplate>
            </web:Repeater.ItemTemplate>
        </web:Repeater>
        <web:LineBreak/>
        <DataGrid Id="grid1" Width="100%">
            <DataGrid.DataSource>
                <EnumerableDataProvider>
                    <sys:String>a</sys:String>
                    <sys:String>b</sys:String>
                    <sys:String>c</sys:String>
                </EnumerableDataProvider>
            </DataGrid.DataSource>
            <DataGrid.DataGridColumns>
                <Column>
                    <Column.ItemTemplate>
                        <DataTemplate web:ClientTemplate.RunAt="Client">
                            <TextBox Text="{Binding }" />
                        </DataTemplate>
                    </Column.ItemTemplate>
                </Column>
                <Column>
                    <Column.ItemTemplate>
                        <DataTemplate web:ClientTemplate.RunAt="Client">
                            <Button Text="{Binding }" />
                        </DataTemplate>
                    </Column.ItemTemplate>
                </Column>
            </DataGrid.DataGridColumns>
        </DataGrid>
    </StackPanel>
</Page>